package io.jboot.fly.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringUtil {

	public static boolean isFormatCorrect(String str) {
		//^在[]外，限定。在里面，否定；+表示一次或多次
		String strPattern = "^[a-zA-Z_][a-zA-Z_0-9]+";
		Pattern p = Pattern.compile(strPattern);
		Matcher m = p.matcher(str);
		return m.matches();
	}

}